package com.asiainfo.dacp.datastash.orm.dao.inter;

import com.asiainfo.dacp.datastash.orm.po.inter.DataStashUnitInterPo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * Created by winter on 2018/1/29.
 */
@Repository
public interface DataStashUnitInterDao extends JpaRepository<DataStashUnitInterPo,Long>,JpaSpecificationExecutor<DataStashUnitInterPo> {


    @Query("select p from DataStashUnitInterPo p where p.unitCode=:unitCode and p.dataStashUnitInterPoPK.unitProcId=:unitProcId   and p.dataStashUnitInterPoPK.oper=:oper ")
    DataStashUnitInterPo findList(@Param("unitCode") String unitCode,@Param("unitProcId") String unitProcId,@Param("oper") String oper   );
}